home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-11-11 | 4.9 KB | 175 lines | [TEXT/MPS ] |
- ;
- ; File: PictUtils.a
- ;
- ; Copyright: © 1984-1994 by Apple Computer, Inc.
- ; All rights reserved.
- ;
- ; Version: Universal Interfaces 2.0a3 ETO #16, MPW prerelease. Friday, November 11, 1994.
- ;
- ; Bugs?: If you find a problem with this file, send the file and version
- ; information (from above) and the problem description to:
- ;
- ; Internet: apple.bugs@applelink.apple.com
- ; AppleLink: APPLE.BUGS
- ;
- ;
-
- IF &TYPE('__PICTUTILS__') = 'UNDEFINED' THEN
- __PICTUTILS__ SET 1
-
-
- IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
- include 'Types.a'
- ENDIF
- ; include 'ConditionalMacros.a' ;
-
- IF &TYPE('__WINDOWS__') = 'UNDEFINED' THEN
- include 'Windows.a'
- ENDIF
- ; include 'Memory.a' ;
- ; include 'MixedMode.a' ;
- ; include 'Quickdraw.a' ;
- ; include 'QuickdrawText.a' ;
- ; include 'Events.a' ;
- ; include 'OSUtils.a' ;
- ; include 'Controls.a' ;
- ; include 'Menus.a' ;
-
- IF &TYPE('__PALETTES__') = 'UNDEFINED' THEN
- include 'Palettes.a'
- ENDIF
-
- returnColorTable EQU $0001
- returnPalette EQU $0002
- recordComments EQU $0004
- recordFontInfo EQU $0008
- suppressBlackAndWhite EQU $0010
-
- ; color pick methods
- systemMethod EQU 0 ; system color pick method
- popularMethod EQU 1 ; method that chooses the most popular set of colors
- medianMethod EQU 2 ; method that chooses a good average mix of colors
- ; color bank types
- ColorBankIsCustom EQU -1
- ColorBankIsExactAnd555 EQU 0
- ColorBankIs555 EQU 1
-
- CommentSpec RECORD 0
- count ds.w 1 ; number of occurrances of this comment ID
- ID ds.w 1 ; ID for the comment in the picture
- sizeof EQU 4
- ENDR
-
- FontSpec RECORD 0
- pictFontID ds.w 1 ; ID of the font in the picture
- sysFontID ds.w 1 ; ID of the same font in the current system file
- size ds.l 4 ; bit array of all the sizes found (1..127) (bit 0 means > 127)
- style ds.w 1 ; combined style of all occurrances of the font
- nameOffset ds.l 1 ; offset into the fontNamesHdl handle for the font’s name
- sizeof EQU 26
- ENDR
-
- PictInfo RECORD 0
- version ds.w 1 ; this is always zero, for now
- uniqueColors ds.l 1 ; the number of actual colors in the picture(s)/pixmap(s)
- thePalette ds.l 1 ; handle to the palette information
- theColorTable ds.l 1 ; handle to the color table
- hRes ds.l 1 ; maximum horizontal resolution for all the pixmaps
- vRes ds.l 1 ; maximum vertical resolution for all the pixmaps
- depth ds.w 1 ; maximum depth for all the pixmaps (in the picture)
- sourceRect ds Rect ; the picture frame rectangle (this contains the entire picture)
- textCount ds.l 1 ; total number of text strings in the picture
- lineCount ds.l 1 ; total number of lines in the picture
- rectCount ds.l 1 ; total number of rectangles in the picture
- rRectCount ds.l 1 ; total number of round rectangles in the picture
- ovalCount ds.l 1 ; total number of ovals in the picture
- arcCount ds.l 1 ; total number of arcs in the picture
- polyCount ds.l 1 ; total number of polygons in the picture
- regionCount ds.l 1 ; total number of regions in the picture
- bitMapCount ds.l 1 ; total number of bitmaps in the picture
- pixMapCount ds.l 1 ; total number of pixmaps in the picture
- commentCount ds.l 1 ; total number of comments in the picture
- uniqueComments ds.l 1 ; the number of unique comments in the picture
- commentHandle ds.l 1 ; handle to all the comment information
- uniqueFonts ds.l 1 ; the number of unique fonts in the picture
- fontHandle ds.l 1 ; handle to the FontSpec information
- fontNamesHandle ds.l 1 ; handle to the font names
- reserved1 ds.l 1
- reserved2 ds.l 1
- sizeof EQU 104
- ENDR
-
- IF GENERATING68K THEN
- Macro
- _GetPictInfo
- move.w #$0800,d0
- dc.w $A831
- EndM
- ELSE
- IMPORT GetPictInfo
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _GetPixMapInfo
- move.w #$0801,d0
- dc.w $A831
- EndM
- ELSE
- IMPORT GetPixMapInfo
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _NewPictInfo
- move.w #$0602,d0
- dc.w $A831
- EndM
- ELSE
- IMPORT NewPictInfo
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _RecordPictInfo
- move.w #$0403,d0
- dc.w $A831
- EndM
- ELSE
- IMPORT RecordPictInfo
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _RecordPixMapInfo
- move.w #$0404,d0
- dc.w $A831
- EndM
- ELSE
- IMPORT RecordPixMapInfo
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _RetrievePictInfo
- move.w #$0505,d0
- dc.w $A831
- EndM
- ELSE
- IMPORT RetrievePictInfo
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _DisposePictInfo
- move.w #$0206,d0
- dc.w $A831
- EndM
- ELSE
- IMPORT DisposePictInfo
- ENDIF
-
- IF OLDROUTINENAMES THEN
- ENDIF
- ENDIF ; __PICTUTILS__
-